<!DOCTYPE html>
<html lang="zh">
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>客户调转</title>
    <link rel="icon" href="favicon.ico" type="images/ico">
    <meta name="author" content="dc">
    <link rel="stylesheet" type="text/css" href="/css/materialdesignicons.min.css">
    <link rel="stylesheet" type="text/css" href="/css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="/css/bootstrapValidator.min.css">
    <link rel="stylesheet" type="text/css" href="/css/animate.min.css">
    <link rel="stylesheet" type="text/css" href="/css/style.min.css">
    <link href="/js/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
    <link rel="stylesheet" href="/js/jquery-confirm/jquery-confirm.min.css">
    <!--固定table列-->
    <link href="/js/bootstrap-table/extensions/fixed-columns/bootstrap-table-fixed-columns.min.css" rel="stylesheet"/>
    <!--时间选择插件-->
    <link rel="stylesheet" href="/js/bootstrap-datetimepicker/bootstrap-datetimepicker.min.css">
    <!--日期选择插件-->
    <link rel="stylesheet" href="/js/bootstrap-datepicker/bootstrap-datepicker3.min.css">
    <link rel="stylesheet" href="/css/skin.css">
    <link rel="stylesheet" href="/css/customerManager/customerTran.css">
</head>
<body>
<div class="container-fluid">
    <div class="card">
        <input id="spiderUrl" type="hidden" th:value="${spiderUrl}"/>
        <div class="card-header">
            <h1>客户调转</h1>
        </div>
        <div>
            <ul class="new-tabs">
                <!-- 客户导入 客户标签 流转记录-->
                <input type="hidden" id="exchangeType" name="dateType"/>
                <li class="nav-item active" style="margin-left:24px" >
                    <a href="#customerImportTab" data-toggle="tab"  onclick="changeTab('import')"  id="customerImport">客户导入</a>
                </li>
                <li class="nav-item">
                    <a href="#customerSignTab" data-toggle="tab"   onclick="changeTab('sign')" id="customerSign">客户标签</a>
                </li>
                <li class="nav-item">
                    <a href="#circulationRecordTab" data-toggle="tab"  onclick="changeTab('record')" id="circulationRecord">流转记录</a>
                </li>
            </ul>
            <main class="tab-content">
                <div role="tabpanel" id="customerImportTab" class="tab-pane active">
                    <div class="pull-left" style="margin-bottom:15px">
                        <div class="btn-group">
                            <button type="button" class="btn btn-purple" style="margin-right:10px" onclick="openSigns()"><i class="mdi mdi-marker"></i>批量标记 </button>
                            <button type="button" class="btn btn-danger" onclick="deleteDataOperate()"><i class="mdi mdi-delete"></i>批量删除 </button>
                        </div>
                    </div>
                    <div class="pull-right" style="margin-bottom:15px">
                        <div class="pull-right">
                            <div class="min-search pull-left">
                                <input class="form-control" type="text" placeholder="请输入客户名称"
                                       id="enterpriseName" name="enterpriseName">
                                <button class="btn btn-primary" style="height:36px" type="button" onclick="enterpriseNameSearch()">
                                    <i class="mdi mdi-magnify"></i><span>搜索</span>
                                </button>
                            </div>
                            <!--<div class="btn-group" style="margin-left:20px">
                                <button type="button" class="btn btn-success btn-label" data-toggle="modal" onclick="showImportCustomerTranModal()"><label><i class="mdi mdi-download"></i></label>导入</button>
                            </div>-->
                            <div class="btn-group pull-right" style="margin-left:20px">
                                <button type="button" class="btn btn-success dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                                    <i class="mdi mdi-download"></i>导入/导出</span>
                                </button>
                                <ul class="dropdown-menu">
                                    <li><a href="#!" onclick="showImportCustomerTranModal()">导入</a></li>
                                    <li><a href="#!" onclick="exportCompanyInfo()">导出</a></li>
                                </ul>
                            </div>
                        </div>
                        <div id="advanceFilterContainer" class="pull-right">
                            <button class="btn btn-default btn-senior" id="openFilter" onClick="showToggle()"><i class="mdi mdi-sort-variant"></i>高级筛选</button>
                            <button class="btn btn-default btn-senior" id="closeFilter" onClick="showToggle()"><i class="mdi mdi-close"></i>关闭筛选</button>
                            <div id="filterFilesContainer" class="clearFix">
                                <div id="filterFiles" class="clearFix">
                                    <!--<h4>高级筛选</h4>-->
                                    <div class="clearFix filterContent">
                                        <!--按导入时间(区间)查询-->
                                        <div class="form-group  col-lg-6 col-md-6 col-sm-6 col-xs-12" >
                                            <label class="control-label" for="createTmStart">导入时间:</label>
                                            <div class="form-content input-group">
                                                <input type="text" onkeydown ="return false"  class="form-control create-time" id="createTmStart"
                                                       placeholder="请选择导入时间" autocomplete="off">
                                                <span class="input-group-addon">-</span>
                                                <input type="text" onkeydown ="return false"  class="form-control create-time" id="createTmEnd"
                                                       placeholder="请选择导入时间" autocomplete="off">
                                            </div>
                                        </div>
                                        <div class="form-group clearFix col-lg-6 col-md-6 col-sm-6 col-xs-12">
                                            <label class="control-label pull-left">输入标签:</label>
                                            <div class="form-content">
                                                <input type="text" id="sysTagFilter" class="form-control" placeholder="请输入标签"/>
                                            </div>
                                        </div>
                                        <div class="pull-right">
                                            <button class="btn btn-default" id="btn-reset" onClick="clearSearchData()">重置</button>
                                            <button class="btn btn-primary" type="button" id="btn-search" onClick="localSearch()">
                                                <i class="mdi mdi-magnify"></i><span>搜索</span>
                                            </button>
                                        </div>

                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <table id="customerTranTable"></table>
                </div>
                <div role="tabpanel" id="customerSignTab" class="tab-pane">
                    <div class="pull-right">
                        <div class="btn-group pull-right" style="margin-bottom:20px">
                            <button type="button" class="btn btn-success" data-toggle="modal" data-target="#importTemplate" aria-haspopup="true" aria-expanded="false">
                                <i class="mdi mdi-download"></i> 批量打标签</span>
                            </button>
                            <!--<ul class="dropdown-menu">
                                <li><a href="#!">导入</a></li>
                                <li><a href="#!">导出</a></li>
                            </ul>-->
                        </div>
                    </div>
                    <table id="customerSignTable"></table>
                </div>
                <div role="tabpanel" id="circulationRecordTab" class="tab-pane">
                    <div class="pull-right" style="margin-bottom:15px">
                        <div class="min-search pull-left">
                            <input class="form-control" type="text" placeholder="请输入客户名称"
                                   id="customerName" name="customerName">
                            <button class="btn btn-primary" style="height:36px" type="button" onclick="customerNameSearch()">
                                <i class="mdi mdi-magnify"></i><span>搜索</span>
                            </button>
                        </div>
                    </div>
                    <table id="circulationRecordTable"></table>
                </div>
            </main>
        </div>
    </div>
</div>

<!--导入-->
<div class="modal fade" id="importCustomerTranModal" tabindex="-1" role="dialog"
     aria-labelledby="exampleModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="exampleModalLabel">导入客户调转信息</h4>
            </div>
            <div class="modal-body">
                <div class="form-group">
                    <label for="sysTag" class="control-label label-required">标签</label>
                    <input type="text" class="form-control" id="sysTag" name="sysTag"/>
                </div>
                <div class="form-group">
                    <input type="file" id="importCustomerTranFile" name="importCustomerTranFile"/>
                </div>
                <div class="clearfix hidden-xs"></div>
                <div class="text-right">
                    <button type="button" class="btn btn-primary" style='margin-right:10px' onclick="importCustomerTranList()">导入</button>
                    <button type="button" class="btn btn-default" data-dismiss="modal" onclick="cancelImportCustomerTranList()">取消</button>
                </div>
            </div>
        </div>
    </div>
</div>
<!--批量标记-->
<div class="modal fade" id="signsModal" tabindex="-1" role="dialog"
     aria-labelledby="exampleModalLabel">
    <div class="modal-dialog" role="document" style="width:450px">
        <div class="modal-content clearFix">
            <div class="modal-header">
                <!--<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>-->
                <h4 class="modal-title">批量标记</h4>
            </div>
            <div class="modal-body">
                <form id="signsForm">
                    <div class="form-group" style="display: flex; line-height: 38px;">
                        <label class="control-label pull-left label-required">填写标签:</label>
                        <div class="form-content" style="width:calc(100% - 80px);margin-left:5px">
                            <input type="text" class="form-control" placeholder="请输入标签" id="sign" name="sign"/>
                        </div>
                    </div>
                </form>
                <div class="pull-right" style="padding:20px 0" id="signsFun">
                    <button class="btn btn-default" style="margin-right:10px" data-dismiss="modal">取消</button>
                    <button class="btn btn-primary" type="button" onclick="submitSigns()">提交</button>
                </div>
            </div>
        </div>
    </div>
</div>
<!--修改标记-->
<div class="modal fade" id="editSignModal" tabindex="-1" role="dialog"
     aria-labelledby="exampleModalLabel">
    <div class="modal-dialog" role="document" style="width:450px">
        <div class="modal-content clearFix">
            <div class="modal-header">
                <!--<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>-->
                <h4 class="modal-title">修改标签</h4>
            </div>
            <div class="modal-body">
                <form id="editSignForm">
                    <div class="form-group" style="display: flex; line-height: 38px;">
                        <label class="control-label pull-left label-required">填写标签:</label>
                        <div class="form-content" style="width:calc(100% - 80px);margin-left:5px">
                            <input type="text" class="form-control" placeholder="请输入标签" id="newSign" name="newSign"/>
                        </div>
                    </div>
                </form>
                <div class="pull-right" id="updateSignBtns" style="padding:20px 0">
                    <button class="btn btn-default" style="margin-right:10px" data-dismiss="modal">取消</button>
                    <button class="btn btn-primary" type="button" onclick="submitNewSign()">提交</button>
                </div>
            </div>
        </div>
    </div>
</div>
<!--标签详情-->
<div class="modal fade" id="signDetailModal" tabindex="-1" role="dialog"
     aria-labelledby="exampleModalLabel">
    <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content clearFix">
            <div class="modal-body">
                 <table id="signTable"></table>
            </div>
        </div>
    </div>
</div>
<!-- 导入模板 -->
<div class="modal fade importTemplate" tabindex="-1" role="dialog" data-backdrop="static" id="importTemplate">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header clearFix">
                <h4 class="pull-left">批量打标签</h4>
                <!--<div class="clearFix pull-right"  id="selectCompany" style="width:260px;margin-left: 20px">
                    <select id="searchCompanySelect" name="searchCompanySelect" class="form-control" type="text" placeholder="请选择所属公司">
                        <option value="">请选择所属分公司</option>
                    </select>
                </div>-->
            </div>
            <div class="modal-body">
                <label for="importInput" class="well">
                    <input type="file" accept=".xlsx" id="importInput" class="hide">
                    <i class="mdi mdi-cloud-upload"></i>
                    <p id="nameText">点击选择文件</p>
                </label>
                <!--<div class="progress" id="progress">
                    <div class="progress-bar progress-bar-striped active" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%;">
                        <span class="sr-only">0% Complete</span>
                    </div>
                </div>-->
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary" onclick="importAction(this);" data-loading-text="处理中...">立即导入</button>
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
            </div>
        </div>
    </div>
</div>
<div id="mark"></div>
</body>
<script type="text/javascript" src="/js/jquery.min.js"></script>
<script type="text/javascript" src="/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/js/bootstrapValidator.min.js"></script>
<script type="text/javascript" src="/js/perfect-scrollbar.min.js"></script>
<script src="/js/jquery-confirm/jquery-confirm.min.js"></script>
<!--标签插件-->
<script src="/js/jquery-tags-input/jquery.tagsinput.min.js"></script>
<script type="text/javascript" src="/js/main.min.js"></script>
<script type="text/javascript" src="/js/bootstrap-table/bootstrap-table.min.js"></script>
<script type="text/javascript" src="/js/bootstrap-table/bootstrap-table-zh-CN.min.js"></script>
<script type="text/javascript" src="/js/popper.min.js"></script>
<script type="text/javascript" src="/js/jquery.cookie.min.js"></script>
<script src="/js/crm/common/city.js"></script>
<script src="/js/crm/common/common.js"></script>
<!--table固定列-->
<script type="text/javascript" src="/js/bootstrap-table/extensions/fixed-columns/bootstrap-table-fixed-columns.js"></script>
<!--时间选择插件-->
<script src="/js/bootstrap-datetimepicker/moment.min.js"></script>
<script src="/js/bootstrap-datetimepicker/bootstrap-datetimepicker.min.js"></script>
<script src="/js/bootstrap-datetimepicker/locale/zh-cn.js"></script>
<!--消息提醒-->
<script type="text/javascript" src="/js/bootstrap-notify.min.js"></script>
<script type="text/javascript" src="/js/crm/common/lightyear.js"></script>
<!--表格多选-->
<script src="/js/bootstrapTableSelect.js"></script>
<!-- 子页面公用js -->
<script src="/js/crm/common/pageCommon.js"></script>
<script src="/js/crm/common/highScreenToggle.js"></script>
<script src="/js/crm/customerManager/customerTran.js"></script>
</html>